#include "CustomerManager.h"
#include "Supermarket.h"

#include "MyTimer.h"
#include "zthread/Thread.h"
#include <iostream>

using namespace ZThread;
using namespace std;

int main()
{

  MyTimer *timer = new MyTimer();
  
  try
    {
      Thread thread_timer (timer);
      
    } catch (Synchronization_Exception& e)
    {
      cerr << e.what() << endl;
      exit(-1);
    }
  
  
  CustomerManager cust;
  Supermarket* sup = new Supermarket(timer);
  cust.attach(sup);
  cust.empezar();
}
